|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnegotiator.Agent
agents.anac.y2011.Nice_Tit_for_Tat.BilateralAgent
public abstract class BilateralAgent
| Field Summary | |
|---|---|
protected Domain |
domain
|
protected BidHistory |
myHistory
|
protected BidHistory |
opponentHistory
|
| Fields inherited from class negotiator.Agent |
|---|
fNegotiation, parametervalues, sessionNr, sessionsTotal, startTime, strategyParameters, timeline, totalTime, utilitySpace |
| Constructor Summary | |
|---|---|
BilateralAgent()
|
|
| Method Summary | |
|---|---|
Action |
chooseAction()
this function is called after ReceiveMessage, with an Offer-action. |
abstract Bid |
chooseCounterBid()
The opponent has already made a bid. |
abstract Bid |
chooseFirstCounterBid()
Use this method to make the first counter-bid. |
abstract Bid |
chooseOpeningBid()
Use this method to make an opening bid. |
Bid |
getMyLastBid()
|
Bid |
getMySecondLastBid()
|
BidHistory |
getOpponentHistory()
|
Bid |
getOpponentLastBid()
|
int |
getRound()
Returns the current round number, starting at 0. |
protected double |
getUndiscountedUtility(Bid bid)
|
static java.lang.String |
getVersion()
|
void |
init()
This method is called by the protocol every time before starting a new session after the internalInit method is called. |
abstract boolean |
isAcceptable(Bid plannedBid)
At some point, one of the parties has to accept an offer to end the negotiation. |
protected static void |
log(java.lang.String s)
|
protected Action |
makeAcceptAction()
By default, if an offer is deemed acceptable, we send accept. |
void |
ReceiveMessage(Action opponentAction)
informs you which action the opponent did |
static double |
round2(double x)
Rounds to two decimals |
| Methods inherited from class negotiator.Agent |
|---|
endSession, getAgentID, getName, getParameterValues, getSessionNumber, getSessionsTotal, getStrategyParameters, getUniqueIdentifier, getUtility, internalInit, isUIAgent, loadSessionData, parseStrategyParameters, restartDataObjectsFolder, saveSessionData, setAgentID, setName, sleep |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Domain domain
protected BidHistory myHistory
protected BidHistory opponentHistory
| Constructor Detail |
|---|
public BilateralAgent()
| Method Detail |
|---|
public void init()
Agent
init in class Agentpublic static java.lang.String getVersion()
public void ReceiveMessage(Action opponentAction)
Agent
ReceiveMessage in class Agentprotected double getUndiscountedUtility(Bid bid)
public Action chooseAction()
Agent
chooseAction in class Agentremember: - remember the action or not.
protected Action makeAcceptAction()
public abstract boolean isAcceptable(Bid plannedBid)
plannedBid - public abstract Bid chooseCounterBid()
public abstract Bid chooseOpeningBid()
public abstract Bid chooseFirstCounterBid()
public Bid getMyLastBid()
getMyLastBid in interface BidHistoryKeeperpublic Bid getMySecondLastBid()
getMySecondLastBid in interface BidHistoryKeeperpublic BidHistory getOpponentHistory()
getOpponentHistory in interface BidHistoryKeeperpublic Bid getOpponentLastBid()
getOpponentLastBid in interface BidHistoryKeeperpublic int getRound()
protected static void log(java.lang.String s)
public static double round2(double x)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||